﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using CP.Entities;
using CP.Repositories.GPM;
using CP.Utility;
using System.Data;

namespace CP.Controllers.GPM
{
    public class UserFuncController
    {
        public DataTable GetResourceInfo(string type, string resourcename)
        {
            UserFuncRepository rep = new UserFuncRepository();
            return rep.GetResourceInfo(type,resourcename);
        }

        public IList<User_Info> GetUsersByGroupID(int groupid)
        {
            UserInfoRepository rep = new UserInfoRepository();
            return rep.GetUsersByGroupID(groupid);
        }

        public IList<User_Info> GetUsersByMenuID(int menuid)
        {
            UserInfoRepository rep = new UserInfoRepository();
            return rep.GetUsersByMenuID(menuid);
        }

        public IList<User_Info> GetUsersByButtonID(int webpartid,int buttonid)
        {
            UserInfoRepository rep = new UserInfoRepository();
            return rep.GetUsersByButtonID(webpartid, buttonid);
        }
    }
}
